@keyframes fade {
  0% {
    transform: translateY(30px);
  }
  80% {
    opacity: 100%;
  }
  100% {
    transform: none;
    opacity: 0;
  }
}

.starability-fade {
  display: block;
  position: relative;
  width: 150px;
  min-height: 60px;
  padding: 0;
  border: none;
}

.starability-fade > input {
  position: absolute;
  margin-right: -100%;
  opacity: 0;
}

.starability-fade > input:checked ~ label,
.starability-fade > input:focus ~ label {
  background-position: 0 -30px;
}

.starability-fade > input:hover ~ label {
  background-position: 0 -30px;
}

.starability-fade > input:focus + label {
  outline: 1px dotted #999;
}

.starability-fade > label {
  position: relative;
  display: inline-block;
  float: right;
  width: 30px;
  height: 30px;
  color: transparent;
  cursor: pointer;
  background-image: url("../starability-images/icons.png");
  background-repeat: no-repeat;
}

@media screen and (-webkit-min-device-pixel-ratio: 2), (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .starability-fade > label {
    background-image: url("../starability-images/icons@2x.png");
    background-size: 30px auto;
  }
}

.starability-fade > label:before {
  display: none;
  position: absolute;
  content: ' ';
  width: 30px;
  height: 30px;
  background-image: url("../starability-images/icons.png");
  background-repeat: no-repeat;
  background-position: 0 -30px;
  bottom: 30px;
}

@media screen and (-webkit-min-device-pixel-ratio: 2), (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .starability-fade > label:before {
    background-image: url("../starability-images/icons@2x.png");
    background-size: 30px auto;
  }
}

.starability-fade > input:checked + label:before {
  display: block;
  animation-name: fade;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}
